Skip to content

dgb: embed-at-mint MM commitment into coinbase scriptSig (phase DB) - #477

Merged
frstrtr merged 1 commit into
dgb/doge-mm-db-commitmentfrom
dgb/doge-mm-embed-at-mint
Jun 25, 2026
Merged

dgb: embed-at-mint MM commitment into coinbase scriptSig (phase DB)#477
frstrtr merged 1 commit into
dgb/doge-mm-db-commitmentfrom
dgb/doge-mm-embed-at-mint

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Phase DB embed-at-mint live-wire. Stacks on #475 (consumes dgb::coin::build_aux_mm_commitment); retarget base->master after #475 merges.

What: ConnCoinbasePplnsInputs gains optional aux_mm_commitment; build_connection_coinbase_from_pplns appends the pre-built 44-byte AuxPoW MM tag to the coinbase scriptSig when present, so a won DGB block built as the DOGE merged-mining parent (-DAUX_DOGE=ON) carries the commitment the aux verifier decodes.

Byte-identical default no-op: nullopt (standalone V36 parent, and always when AUX_DOGE off since the producer only populates under #ifdef AUX_DOGE) leaves the scriptSig/gentx byte-identical -- structural, no regression to the default build.

Scope fence: src/impl/dgb/ only; zero ltc/doge tree edits. Live aux-root sourcing is the gated DC routing slice, NOT wired here (ltc-doge consumer-only [s=concur] + backend-exclusivity guard still OPEN).

Placement note for review: MM tag appended to coinbase scriptSig per AuxPoW convention / merged_mining.cpp:165-198 the #475 builder mirrors. Reviewers/ltc-doge: confirm against the aux verifier scriptSig decode path.

KAT (dgb_connection_coinbase_test, both default + AUX_DOGE arms, 12/12):

Consensus-bearing -> operator tap. No self-merge.

Wire the #475 dgb::coin::build_aux_mm_commitment SSOT into the per-
connection coinbase assembler so a won DGB block, built as the DOGE
merged-mining parent (-DAUX_DOGE=ON), carries the 44-byte AuxPoW MM tag
(magic fabe6d6d || aux_root32 BE || size4 LE || nonce4 LE) the aux
verifier decodes.

ConnCoinbasePplnsInputs gains an optional aux_mm_commitment carrying the
pre-built tag; build_connection_coinbase_from_pplns appends it to the
coinbase scriptSig when present. DEFAULT nullopt leaves the scriptSig --
and therefore the whole gentx -- BYTE-IDENTICAL to the standalone-parent
build: the no-op is structural, so the default V36 DGB build cannot
regress. The producer (main_dgb seam) only ever populates the field under
#ifdef AUX_DOGE; sourcing a LIVE aux merkle root is the gated DC routing
slice and is deliberately not wired here.

KAT (connection_coinbase_test, runs in both default and AUX_DOGE arms):
  E1 NulloptIsByteIdentical  -- nullopt == no-aux gentx, txid-identical
  E2 AppendsMmTagToScriptSig -- gentx grows by EXACTLY 44 bytes, tag bytes
     match the #475 SSOT, scriptSig == baseline || tag
12/12 green both arms. Fenced to src/impl/dgb/; no ltc/doge tree edits.
@frstrtr
frstrtr merged commit 2e80314 into dgb/doge-mm-db-commitment Jun 25, 2026
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant